// 页面的预加载检查
let Page_Prefab = {
    'upLeftBar': [],
    'upRightBar': [],
    'middleBar': [],
    'currencyBar': [],
    'bzzyPage': [],
    'drawPage': [
        "uimod/red_dot",
        "uimod/drawPre",
        { name: 'newBarrier', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'TestBarrierPage': [
        "prefab/barrierNode",
        "uimod/drawPre",
        // { name: 'IceBarrier', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'newBarrier', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'bg-1', type: cc.SpriteAtlas, bundle: 'plist' },
        // { name: 'bg-3', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'shipPage': [
        'uimod/pk',
        { name: 'newBarrier', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'effect', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'gameMapPage': [
        "prefab/barrierNode",
        // { name: 'IceBarrier', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'newBarrier', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'bg-1', type: cc.SpriteAtlas, bundle: 'plist' },
        // { name: 'bg-3', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'storePage': [
        "uimod/shipItem",
        "uimod/storeItem",
        "uimod/buffItem",
        { name: 'ship', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'signPage': [
        { name: 'newTaskSign', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'missionPage': [
        "uimod/missionItem",
        { name: 'newTaskSign', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'newFrame', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'newBarrier', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'signReward', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'rewardPage': [
        "uimod/rewardItem",
    ],
    'fieldGuidePage': [
        'uimod/fieldGuideItem',
        { name: 'fieldMap', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'prop', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'newFrame', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'gardenPage': [
        { name: 'garden', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'warter', type: cc.AudioClip, bundle: 'voice' },
        'uimod/vegetablePlotItem',
    ],
    'giftBoxePage': [
    ],
    'gameOverPage': [
        "uimod/resultPre",
        { name: 'playTopBar', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'passListPage': [
        "uimod/passListItem",
    ],
    'testPage': [

    ]
}

// 场景预加载
let Scene_Prefab = {
    'Playground': [
        { name: 'guide', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'click', type: cc.AudioClip, bundle: 'voice' },
        { name: 'back', type: cc.AudioClip, bundle: 'voice' },
        { name: 'boom', type: cc.AudioClip, bundle: 'voice' },
        { name: 'grabItem', type: cc.AudioClip, bundle: 'voice' },
        { name: 'bgm_battle', type: cc.AudioClip, bundle: 'voice' },
    ],
    'Main': [
    ]
}

// 登陆状态
let Login_Status = {
    CHECK: 1,           // 检测登录
    LOGIN: 2,           // 登录中
    LOAD_RES: 3,         // 资源加载
    LOGIN_FAIL: 4,       // 登录失败
    LOGIN_SUCCESS: 5,    // 登录成功
    UPDATE_VERSION: 6,   // 更新新版本
    CHECK_UPDATE: 7,     // 检查版本更新
    UPDATE_FAIL: 8,      // 更新失败
    TO_MAIN: 9,          // 转跳场景
}
// UI 层级
let UI_Layer = cc.Enum({
    Base: 1,     // 基础
    Cover: 2,    // 遮罩
    Pop: 3,      // 界面
    Load: 4,     // 加载层
    Click: 5,    // 点击特效
    Msg: 6       // 信息层
})
/**
    * 操作枚举管理
    * 比如红点 比如强制更新 比如Load
*/
let Control_Listen = cc.Enum({
    CLOSE_TRANSITION: 101,
    LOAD_TRANSITION: 102, // 过度展现加载中 
    OPEN_TRANSITION: 103, // 打开过度
})
/**
    * ui枚举管理
    * 所有的UI监听全写在里面
    * 只不过对对应页面进行监听管理
*/
let UI_Listen = cc.Enum({
    MAIN_OPENSTAGE: 1,      //Main场景打开Page
    MAIN_COLSESTAGE: 2,     //Main场景打开Page
    MAIN_ANIOVER: 3,     //开场动画结束
    TESTBARRIER_ENDTOUCH: 9999,         //编辑障碍物页面结束触摸
    TESTBARRIER_CLICK: 9998,             //编辑障碍物页面点击

    TB_UPDATESCORE: 3001,               //分数更新
    TB_UPDATEPROP: 3002,                   //道具数量更新

    TB_ENDCHECK: 3003,               //检测是否结束游戏
    TB_ICEEND: 3004,                 //破冻
    TB_PAGECLICK: 3005,                  //出钩子了
    TB_PROPINFO: 3006,                   //道具信息
    TB_CLOSEINFO: 3007,                  //关闭道具信息页面
    ST_CHOOSE: 4001,                        //选中
    ST_UPDATESHIP: 4002,                    //刷新船列表
    ST_UPDATEMONEY: 4003,                    //金币数量刷新
    ST_UPDATEPROP: 4004,                     //道具数量刷新

    GM_FLASHITEMS: 5001,                     //闪烁要抓的东西
    UPDATE_PLAYGROUND: 9997,                 //重新开始游戏
    MAIN_ADSHOW: 4,
})
/**
    * 红点枚举
    * 其实也需要根据页面
    * 只不过对对应页面进行监听管理
*/
let RedDot_Key = cc.Enum({
    // 三位数系列 用于基础监听
    ALL: 100,  // 全部打开
})
/**
    * GM 显示页面
    * 对应场景显示对应预制体
*/
let Scene_GM_Page = {
    'Main': [
        { name: 'gm_boids', layer: UI_Layer.Msg, script: 'gm_boids' },
    ]
}

let BASE_COLOR = {
    red: '#DD2B2B',
    green: '#2BDD56',
    blue: '#348DDF',
    yellow: '#F3D11D',
    prue: '#84049C',
    pink: '#E67FD9',
    orange: '#DB971D',
    white: '#ffffff',
    gray: '#cccccc',
    black: '#2b2b2b'
}
export { Login_Status, Page_Prefab, Scene_Prefab, UI_Layer, Control_Listen, UI_Listen, Scene_GM_Page, RedDot_Key, BASE_COLOR }


